package org.veridiandynamics.server.model;

import java.util.Map;

import org.veridiandynamics.server.domain.*;
public class InvoiceModel {

	public Float totalInvoiceCost(Invoice patientInvoice) {
		Map<String, Float> itemizedList = patientInvoice.getMyItemizedList();
		Float total = 0.0f;
		for (String key : itemizedList.keySet()) {
			total += itemizedList.get(key);
		}
		return total;
	}
    
	public Invoice retrieveInvoice(Invoice invoice) {
		return null;
	}
	
	public float getTotalCost(Invoice invoice)
	{
		float total=0;
		ServicesBillable[] servicearray= invoice.getServicesList().toArray(new ServicesBillable[0]);
		for (int i=0; i<servicearray.length;i++)
		{
			total+=servicearray[i].getCost();
		}
		return total;
	}
}
